<form class="form-inline" method="get">

    <div class="form-group col-xs-2">
        <div class="col-xs-12">
            <input class="form-control" name="bussiness_name" value="{$bussiness_name}"
                   placeholder="商会名称|商会ID">
        </div>
    </div>

    <div class="form-group col-xs-2">
        <div class="col-xs-12">
            <input class="form-control" name="condition" value="{$condition}"
                   placeholder="公告标题">
        </div>
    </div>
    <div class="form-group col-xs-2">
        <button type="submit" class="btn btn-success">
            搜索
        </button>

        <button type="button" class="btn btn-primary" onclick="modal('{:url(\'add\')}','添加公告')">
            添加公告
        </button>
    </div>
</form>

<hr>

<table class="table table-striped">
    <thead>
    <tr>
        <td>ID</td>
        <td>商会</td>
        <td>标题</td>
        <td>排序</td>
        <td>是否显示</td>
        <td>编辑时间</td>
        <td>操作</td>
    </tr>
    </thead>
    <tbody>
    {volist name="list" id="item"}
    <tr>
        <td>{$item.id}</td>
        {if condition="$item.bussiness_id gt 0"}
        <td>
            <p>{$item.bussiness_name|default='已删'}【ID：{$item.bussiness_id}】</p>
        </td>
        {else/}
        <td>{:config('none_bussiness')}</td>
        {/if}
        <td>{$item.name}</td>
        <td>{$item.display_order}</td>
        <td>
            {if condition="$item.is_visible ==1"}
            显示
            {else /}
            隐藏
            {/if}
        </td>

        <td>{$item.update_time|show_datetime}</td>
        <td>

            <a href="javascript:void(0)" class="btn btn-primary btn-sm"
               onclick="modal('{:url(\'edit\',array(\'aid\'=>$item[\'id\']))}')">编辑</a>
            <a href="javascript:void(0)" class="btn btn-danger btn-sm" data-toggle="confirm" data-title="删除"
               data-content="确定要删除吗？"
               data-url="{:url('removeNotice',array('rid'=>$item['id']))}">删除</a>

        </td>
    </tr>
    {/volist}
    </tbody>
</table>

<div class="row">
    <div class="col-xs-12" style="text-align: right;">
        {$list->render()}
    </div>
</div>
